﻿@model HackApp.Models.IdeaModel
@{
  ViewBag.Title = "Idea Details";
}
@section Head
{
  <script type="text/javascript">
    $(document).ready(function ()
    {
      VoteModel.voteCount = parseInt(@ViewData["VoteCount"]);

      GetComments(@Model.Id);
    });
  </script>
}
<div class="row-fluid">

  <!--Info column on the left-->
  <div class="span3 well">
    <h3>Check this out!</h3>
    <p>Lorem ipsum</p>
  </div>

  <!--Main content with ideas list-->
  <div class="span9">

    <ul class="breadcrumb">
      <li>@Html.ActionLink("Ideas List", "Index")</li>
      <li><span class="divider">/</span></li>
      <li class="active">@Model.Name</li>
    </ul>

    <div style="float: right;"><i>Posted by <b>@Model.Author</b></i><br><span><b><span id="voteCount">-1</span></b> vote(s) so far</span></div>
    <h2>@Model.Name</h2>

    <hr>

    <div>@Model.Description</div>

    <hr>
    <div style="float: right;">
      
      <a class="btn btn-danger" href="javascript:VoteIdea(@Model.Id);"><i class="icon-thumbs-up icon-white"></i>Vote this idea</a>
    </div>

    <ul class="nav nav-tabs">
      <li class="active"><a href="#">Comments</a> </li>
    </ul>

    <div style="display:none;" id="commentTemplate">
      @Html.Partial("CommentTemplate", new HackApp.Models.PostModel());
    </div>

    <div id="postContainer">

    </div>

    <textarea class="span7" id="fieldComment" placeholder="Enter your comment here"></textarea>

    <br>
    <a class="btn btn-success btn-large" href="javascript:AddComment(@Model.Id);"><i class="icon-plus-sign icon-white"></i>Add comment</a>
  </div>
</div>

